package com.naiterui.ehp.bs.b2c.address.service;

import java.util.List;

import com.naiterui.ehp.bp.support.exception.BusinessException;
import com.naiterui.ehp.bs.b2c.address.vo.ShippingInfoDetailVO;
import com.naiterui.ehp.bs.b2c.address.vo.ShippingInfoParamVO;
import com.naiterui.ehp.bs.b2c.address.vo.ShippingInfoVO;
import com.naiterui.ehp.bs.b2c.common.bo.address.ShippingInfoBO;

public interface IShippingInfoService {

    /**
     * 根据用户获取地址簿列表
     *
     * @param userId
     *
     * @return
     */
    List<ShippingInfoVO> getShippingInfoList(Long userId);

    /**
     * 根据用户ID\地址ID获取地址详情
     *
     * @param userId
     * @param shippingInfoId
     *
     * @return
     */
    ShippingInfoDetailVO getShippingInfo(Long userId, Long shippingInfoId);

    /**
     * 保存或新增地址
     *
     * @param userId
     * @param shippingInfoParamVO
     *
     * @return
     */
    ShippingInfoVO saveShippingInfo(Long userId, ShippingInfoParamVO shippingInfoParamVO) throws BusinessException;

    /**
     * 删除地址
     *
     * @param userId
     * @param shippingInfoId
     */
    void deleteShippingInfo(Long userId, Long shippingInfoId);

    /**
     * 获取默认收货地址
     *
     * @param userId
     *
     * @return
     */
    ShippingInfoBO getDefaultShippingInfo(Long userId);

    /**
     * 获取收货地址详细信息
     *
     * @param shippingInfoId
     * @param userId
     *
     * @return
     */
    ShippingInfoBO getShippingInfoById(Long shippingInfoId, Long userId);
}
